package com.hobson.design.factory.builder;

import java.util.List;

/**
 * 创建订单请求参数
 *
 * @author: haibin.tang
 * @date: 2020/8/6
 */
public class CreateOrderRequest {
    private String couponId;
    private List<Item> products;

    public static class Item {
        private String productId;
        private Integer quantity;
        private Integer price;

        public String getProductId() {
            return productId;
        }

        public void setProductId(String productId) {
            this.productId = productId;
        }

        public Integer getQuantity() {
            return quantity;
        }

        public void setQuantity(Integer quantity) {
            this.quantity = quantity;
        }

        public Integer getPrice() {
            return price;
        }

        public void setPrice(Integer price) {
            this.price = price;
        }

        @Override
        public String toString() {
            return "Item{" +
                    "productId='" + productId + '\'' +
                    ", quantity=" + quantity +
                    ", price=" + price +
                    '}';
        }
    }

    public String getCouponId() {
        return couponId;
    }

    public void setCouponId(String couponId) {
        this.couponId = couponId;
    }

    public List<Item> getProducts() {
        return products;
    }

    public void setProducts(List<Item> products) {
        this.products = products;
    }

    @Override
    public String toString() {
        return "CreateOrderRequest{" +
                "couponId='" + couponId + '\'' +
                ", products=" + products +
                '}';
    }
}
